#include "direction.h"

Direction::Direction() : x(0), y(0) {}

Direction::Direction(int x, int y, float rotate) : x(x), y(y), rotate(rotate) {}

Direction Direction::opposite() {
    return Direction(-x, -y, -rotate);
}

bool Direction::operator==(const Direction& other) const {
    return x == other.x && y == other.y;
}

Direction Direction::UP = Direction(0, -1, -90.0f);
Direction Direction::DOWN = Direction(0, 1, 90.0f);
Direction Direction::LEFT = Direction(-1, 0, 180.0f);
Direction Direction::RIGHT = Direction(1, 0, 0.0f);